<!DOCTYPE html>
<html>
<include file="Public:header" />
<link href="__ACSS__/dialog.css" rel="stylesheet">
<link href="__ACSS__/plugins/validform/validform.css" rel="stylesheet">
<style>
	.form-control{ padding-left:5px;}
</style>
  <body>
	  <div class="wrapper wrapper-content animated fadeInRight">
		<form role="form" class="form" action="__URL__/update">
			<input type="hidden" name="update_time" value="<php>echo time();</php>">
			<input type="hidden" name="id" value="<{$vo.id}>">
			<div class="form-group">
				<label class="col-sm-2 control-label">组名：</label>
				<div class="col-sm-10">
					<input type="text" datatype="s2-20" name="title" errormsg="至少2个字符,最多20个字符！" class="form-control" value="<{$vo.title}>" placeholder="组名">
				</div>
			</div>
			<div class="form-group">
				<label class="col-sm-2 control-label">描述：</label>
				<div class="col-sm-10">
					<input type="text" datatype="*" name="description" class="form-control" value="<{$vo.description}>" placeholder="描述">
				</div>
			</div>
			<div class="form-group">
				<label class="col-sm-2 control-label">状态：</label>
				<div class="col-sm-10">
					<label class="radio-inline">
						<input type="radio" name="status" <if condition="$vo.status eq 1"> checked</if> value="1"> 正常
					</label>
					<label class="radio-inline">
						<input type="radio" name="status" <if condition="$vo.status eq 0"> checked</if> value="0"> 禁用
					</label>
				</div>
			</div>
			<div class="clearfix"></div>
			<br/>
			<div class="clearfix">
				<button type="submit" id="submit" class="btn btn-success btn-block">提交</button>
				<button type="reset" id="reset2" class="hidden btn btn-success btn-block">重置</button>
			</div>
		</form>
	  </div>
  </body>
<!-- 全局js -->
<include file="Public:foot" />
<script src="__AJSPLUGINS__/validform/Validform_v5.3.2_min.js"></script>
<script>
$(function(){
	$("#reset2").click();
	var index = parent.layer.getFrameIndex(window.name);
	var form = $(".form").Validform({
		tiptype:4,
		ajaxPost:true,
		callback:function(data){
			if(data.status == 1) {
				window.parent.layer.msg(data.info);
				window.parent.$('#table_list').trigger("reloadGrid");
			}else{
				window.parent.layer.msg(data.info);
			}
			parent.layer.close(index);
		}
	});
})
</script>
</html>